﻿// -------------------------------------------------------------------------
//    @FileName         :    NFRoulettePart.cpp
//    @Author           :    gaoyi
//    @Date             :    2025/1/7
//    @Email            :    445267987@qq.com
//    @Module           :    NFRoulettePart
//
// -------------------------------------------------------------------------

#include "NFRoulettePart.h"

#include "proto_db.pb.h"

NFRoulettePart::NFRoulettePart()
{
    if (EN_OBJ_MODE_INIT == NFShmMgr::Instance()->GetCreateMode())
    {
        CreateInit();
    }
    else
    {
        ResumeInit();
    }
}

NFRoulettePart::~NFRoulettePart()
{
}

int NFRoulettePart::CreateInit()
{
    return 0;
}
    
int NFRoulettePart::ResumeInit()
{
    return 0;
}

int NFRoulettePart::LoadFromDB(const proto_ff::tbRoleDetail* pDBData)
{
    m_stData.FromPb(pDBData->role_fortune_data().roulette_data());
    return 0;
}

int NFRoulettePart::InitConfig(proto_ff::tbRoleDetail* pDbData, const RoleOne& stRoleOne)
{
    auto pData = pDbData->mutable_role_fortune_data()->mutable_roulette_data();
    pData->set_lucky(0);
    return 0;
}

int NFRoulettePart::SaveDB(proto_ff::tbRoleDetail* pDBData)
{
    m_stData.ToPb(pDBData->mutable_role_fortune_data()->mutable_roulette_data());
    return 0;
}

int NFRoulettePart::MakePlayerDataCS(proto_ff::Proto_CSGetRoleRsp* pCSGetRoleRsp)
{
    return 0;
}

int NFRoulettePart::MakeCityPlayerData(proto_ff::CityRoleInfo* pGCCityRoleInfo)
{
    return 0;
}
